package com.ly.heart.service;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ly.common.core.domain.AjaxResult;
import com.ly.heart.domain.KingInventoryEntity;
import com.ly.heart.domain.dto.KingInventoryQueryDto;
import com.ly.heart.domain.dto.KingOutInventoryQueryDto;
import com.ly.heart.domain.vo.MenuKingInventoryMaterialVo;
import com.ly.heart.domain.vo.SaleInventoryKingVo;
import com.ly.heart.domain.vo.select.query.KingInventorySelectQueryDto;

/**
 * 金蝶-入库/出库单Service接口
 *
 * @author cxl
 * @date 2024-07-13
 */
public interface IKingInventoryService extends IService<KingInventoryEntity> {

    /**
     * 分页查询入库/出库单列表
     *
     * @param queryDto
     * @return
     */
    AjaxResult getKingInventoryPageListByMaterial ( KingInventoryQueryDto queryDto );

    /**
     * 分页查询销售出库单列表
     *
     * @param queryDto
     * @return
     */
    AjaxResult getKingSaleOutInventoryPageList ( KingInventoryQueryDto queryDto );

    /**
     * 暂存采购入库单
     *
     * @param kingInventory
     * @return
     */
    AjaxResult draftKingInventory ( KingInventoryEntity kingInventory );

    /**
     * 提交采购入库单
     *
     * @param kingInventory
     * @return
     */
    AjaxResult submitKingInventory ( KingInventoryEntity kingInventory );

    /**
     * 修改采购入库单
     *
     * @param kingInventory
     * @return
     */
    AjaxResult updateKingInventory ( KingInventoryEntity kingInventory );

    /***
     * 暂存销售出库单
     * @param kingInventory
     * @return
     */
    AjaxResult saleDraftKingInventory ( KingInventoryEntity kingInventory );

    /**
     * 提交销售出库单
     *
     * @param kingInventory
     * @return
     */
    AjaxResult saleSubmitKingInventory ( KingInventoryEntity kingInventory );


    /**
     * 销售出库单
     * @param kingInventory
     * @return
     */
//    AjaxResult saveSaleKingInventory(KingInventoryEntity kingInventory);

    /**
     * 审核采购入库/销售出库单
     *
     * @param kingInventoryEntity
     * @return
     */

    boolean approvedSaleKingInventory ( KingInventoryEntity kingInventoryEntity );

    /**
     * 查询金蝶-入库/出库单
     *
     * @param id 金蝶-入库/出库单ID
     * @return 金蝶-入库/出库单
     */
    public KingInventoryEntity selectKingInventoryEntityById ( String id );

    /**
     * 查询金蝶-入库/出库单列表
     *
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 金蝶-入库/出库单集合
     */
    public List<KingInventoryEntity> selectKingInventoryEntityList ( KingInventoryEntity kingInventoryEntity );

    /**
     * 新增金蝶-入库/出库单
     *
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 结果
     */
    public int insertKingInventoryEntity ( KingInventoryEntity kingInventoryEntity );

    /**
     * 修改金蝶-入库/出库单
     *
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 结果
     */
    public int updateKingInventoryEntity ( KingInventoryEntity kingInventoryEntity );

    /**
     * 批量删除金蝶-入库/出库单
     *
     * @param ids 需要删除的金蝶-入库/出库单ID
     * @return 结果
     */
    public int deleteKingInventoryEntityByIds ( String[] ids );

    /**
     * 删除金蝶-入库/出库单信息
     *
     * @param id 金蝶-入库/出库单ID
     * @return 结果
     */
    public int deleteKingInventoryEntityById ( String id );


    /**
     * 选单调用销售出库单列表
     *
     * @return
     */
    AjaxResult getMenuSaleInventoryList ( KingInventoryEntity kingInventoryEntity );

    /**
     * 采购入库单选单接口
     *
     * @param queryDto
     * @return
     */
    AjaxResult getKingInventorySelect ( KingInventorySelectQueryDto queryDto );

    /**
     * 查询销售出库单详情
     *
     * @param id
     * @return
     */
    KingInventoryEntity getInventoryById ( String id );

    SaleInventoryKingVo getInventoryCodeById ( String id );


}
